﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Superman man = new Superman();
            Tast(man);
            Console.WriteLine("-------------------------");
            Plane plane = new Plane();
            Tast2(plane);
            Console.WriteLine("-------------------------");
            Bird bird = new Bird();
            Tast3(bird);
        }
        public static void Tast(Superman man)
        {
            IFlyable flyable = man;
            man.Eat();
            flyable.TakeOff();
            flyable.Fly();
            flyable.Land();

        }
        public static void Tast2(Plane plane) 
        {
            IFlyable flyable = plane;
            
            flyable.TakeOff();
            flyable.Fly();
            flyable.Land();
            plane.CarryPassange();
        }
        public static void Tast3(Bird bird) 
        {
            IFlyable flyable = bird;            
            flyable.TakeOff();
            flyable.Fly();
            flyable.Land();
            bird.LayEggs();
            bird.Eat();
        }
    }
}
